package com.example.demo.controller;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/article")
public class DemoController {

    /**
     * 查询文章列表
     */
    // http://localhost:9090/article/list?name=list1
    @GetMapping("/list")
    public String list(@RequestParam(value = "name", defaultValue = "World") String name) {
        return String.format("List   %s!", name);
    }


}
